# _*_coding:utf-8 _*_
#@Time    :2019/7/3 16:06
#@Author  :Dapan
#@Email : 248312738@qq.com
import requests


# url_login = 'http://lf-hl.snssdk.com/passport/mobile/login/?version_code=6.0.0&pass-region=1&pass-route=1&js_sdk_version=1.14.0.0&app_name=aweme&vid=5973D554-529D-49CA-8463-8B784988E4DC&app_version=6.0.0&device_id=41039538336&channel=App%20Store&mcc_mnc=46000&aid=1128&screen_width=750&openudid=fd1f4a581b363b375dfb6d4a9258a01794d6ec38&os_api=18&ac=WIFI&os_version=9.3.2&device_platform=iphone&build_number=60013&device_type=iPhone8,1&iid=71328729675&idfa=37EDCBEB-123F-44AD-A99B-9FE72B9D4677&mobile=2e3d3334363035363c3c3d3d3235&mix_mode=1&password=727571343c3c3434343536&mas=01505079979292ad1efe426fccafddcd6ca2f0b8ab08b0ade820c8&as=a23576419c246d610c4177&ts=1562141004'
#
#
# headers = {
#     'method':	'GET',
#     'authority':	'lf-hl.snssdk.com',
#     'scheme':	'https',
#     'path':'/passport/mobile/login/?version_code=6.0.0&pass-region=1&pass-route=1&js_sdk_version=1.14.0.0&app_name=aweme&vid=5973D554-529D-49CA-8463-8B784988E4DC&app_version=6.0.0&device_id=41039538336&channel=App%20Store&mcc_mnc=46000&aid=1128&screen_width=750&openudid=fd1f4a581b363b375dfb6d4a9258a01794d6ec38&os_api=18&ac=WIFI&os_version=9.3.2&device_platform=iphone&build_number=60013&device_type=iPhone8,1&iid=71328729675&idfa=37EDCBEB-123F-44AD-A99B-9FE72B9D4677&mobile=2e3d3334363035363c3c3d3d3235&mix_mode=1&password=727571343c3c3434343536&mas=01505079979292ad1efe426fccafddcd6ca2f0b8ab08b0ade820c8&as=a23576419c246d610c4177&ts=1562141004',
#     'x-tt-token':	'006429981e1520056691a324451781ccb0e6c18cdf8a452992a1a17e65e96e69216d9382f594ccbdfd8c00cf4f52a3b1b0a',
#     'sdk-version':	'1',
#     'user-agent':	'Aweme 6.0.0 rv:60013 (iPhone; iPhone OS 9.3.2; zh_CN) Cronet',
#     'accept-encoding':	'gzip, deflate',
#     'cookie':	'__tea_sdk__user_unique_id=6619993002276816392; tt_webid=6619993002276816392; install_id=71328729675; ttreq=1$068fe8f3b6f1e1f03e17830c527541940783d287',
# }
#
# res = requests.get(url=url_login,headers=headers)
# print(res.text)



# ==================搜索====================
url_search = 'http://api-hl.amemv.com/aweme/v1/search/sug/?version_code=6.0.0&pass-region=1&pass-route=1&js_sdk_version=1.14.0.0&app_name=aweme&vid=5973D554-529D-49CA-8463-8B784988E4DC&app_version=6.0.0&device_id=41039538336&channel=App%20Store&mcc_mnc=46000&aid=1128&screen_width=750&openudid=fd1f4a581b363b375dfb6d4a9258a01794d6ec38&os_api=18&ac=WIFI&os_version=9.3.2&device_platform=iphone&build_number=60013&device_type=iPhone8,1&iid=71328729675&idfa=37EDCBEB-123F-44AD-A99B-9FE72B9D4677&keyword=%E5%8D%95%E8%BA%AB%E7%8B%97%0A&source=general&mas=017a47edfb4d4f632fb736637e3336029ff8bd314513862dcb46a8&as=a245c6d147de6d831c8411&ts=1562141671'

header2 = {
    'method':'GET',
    'authority':'api-hl.amemv.com',
    'scheme':'https',
    'path':'/aweme/v1/search/sug/?version_code=6.0.0&pass-region=1&pass-route=1&js_sdk_version=1.14.0.0&app_name=aweme&vid=5973D554-529D-49CA-8463-8B784988E4DC&app_version=6.0.0&device_id=41039538336&channel=App%20Store&mcc_mnc=46000&aid=1128&screen_width=750&openudid=fd1f4a581b363b375dfb6d4a9258a01794d6ec38&os_api=18&ac=WIFI&os_version=9.3.2&device_platform=iphone&build_number=60013&device_type=iPhone8,1&iid=71328729675&idfa=37EDCBEB-123F-44AD-A99B-9FE72B9D4677&keyword=%E5%8D%95%E8%BA%AB%E7%8B%97%0A&source=general&mas=017a47edfb4d4f632fb736637e3336029ff8bd314513862dcb46a8&as=a245c6d147de6d831c8411&ts=1562141671',
    'x-tt-token':	'00e0caaa34a584fdf96eec95846e916e813ce726dedcb2ed509a78d2ac5f073f57e59a66294f9c315cb15f9175b06ff8ca5d',
    'sdk-version':	'1',
    'user-agent':	'Aweme 6.0.0 rv:60013 (iPhone; iPhone OS 9.3.2; zh_CN) Cronet',
    'accept-encoding':	'gzip, deflate',
    'cookie':'sid_guard=e0caaa34a584fdf96eec95846e916e81%7C1562141555%7C21600%7CWed%2C+03-Jul-2019+14%3A12%3A35+GMT; sessionid=e0caaa34a584fdf96eec95846e916e81; install_id=71328729675; __tea_sdk__user_unique_id=6619993002276816392',
}

res2 = requests.get(url_search,headers=header2)
print(res2.text)